﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="selectRole.aspx.cs" Inherits="Admin_FileDownLoad_selectRole" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>无标题页</title>
        <script language="javascript"  src="../../DotNet_net/js/jquery-1.3.2.min.js"type="text/javascript"></script>
        <script type="text/javascript" src="../imgs/GetAjax.js"></script> 
        <script type="text/javascript" src="../../DotNet_net/js/common.js"></script>  
</head>
<body>
<form id="form1" runat="server">   
    <div style="width:auto;" class="container" id="cpcontainer">
    <%=input%>
        <asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged" RepeatDirection="Horizontal" RepeatLayout="Flow" RepeatColumns="2">
        </asp:RadioButtonList>
        <asp:CheckBoxList ID="CheckBoxList1" runat="server" RepeatColumns="2" RepeatDirection="Horizontal">
        </asp:CheckBoxList>
         <asp:Button ID="SaveRolePowerBtn" runat="server" Text="保存信息" OnClick="SaveRolePowerBtn_Click" Visible="False" UseSubmitBehavior="False" OnClientClick="this.disabled=true;" class='btn'/>
        &nbsp;
        
        
         <asp:Panel ID="Panel1" runat="server" Visible="False">
         <table style="margin-top: 0px; padding-top: 0px">
            <tr>
                <td align="left" style="width: 100px; height: 20px;" colspan="3" > 
                <select id="Selectid" onchange="bindResource()" > 
                        <%=bindResourceClass()%>
                 </select>
                    名称：<input id="keyword" style="width: 50px" type="text" />
                    <input id="Button1" onclick="SelectKey()" class="btn" type="button" value="搜索" /></td>              
            </tr>
            <tr>
            <td colspan="3" id="resource" align="left">            
                    <asp:CheckBoxList ID="CheckBoxList2" runat="server">
                    </asp:CheckBoxList>&nbsp;           
            </td>
               
            </tr>
             <tr>
                 <td align="center" colspan="3"><div class="pages">
 <%htmlPaging();%></div>
                 </td>
             </tr>
            <tr>
                <td style="width: 100px">
                </td>
                <td style="width: 100px">                    
                    <asp:Button ID="saveResource_btn" runat="server" Text="保存信息" OnClick="saveResource_btn_Click" CommandArgument="1" /></td>
                <td style="width: 100px">
                </td>
            </tr>
        </table>
        </asp:Panel>
        
        
        <asp:Panel ID="Panel2" runat="server" Visible="False">
            <table style="margin-top: 0px; padding-top: 0px">
                <tr>
                    <td align="center" style="width: 100px; height: 20px;" colspan="3" >
                            <%=ProductClassDp("productClassDp")%>
                        名称：
                    </td>
                </tr>
                <tr>
                    <td colspan="3" id="Td1" align="left">                        
                            <asp:CheckBoxList ID="CheckBoxList3" runat="server">
                            </asp:CheckBoxList>
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="3">
                        <div class="pages">
                            <%htmlPaging();%>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td style="width: 100px">
                    </td>
                    <td style="width: 100px">
                        <asp:Button ID="Button2" runat="server" Text="保存信息"  CommandArgument="1" OnClick="Button2_Click" /></td>
                    <td style="width: 100px">
                        </td>
                </tr>
            </table>
        </asp:Panel>        
        &nbsp;
        
        &nbsp;
        &nbsp;&nbsp;&nbsp;&nbsp;
        <input id="pid_hid" runat="server" type="hidden" />
        <input id="type_hide" runat="server" type="hidden" /></div>  
    </form>
</body>
</html>
<script language="javascript" type="text/javascript">
function bindResource()
{    
    var val=escape($("#Selectid :selected").attr("value"));
    var url="";        
    url=convertURL("selectRole.aspx?action=bind&type="+$("#type_hide").attr("value")+"&productId="+$("#pid_hid").attr("value")+"&ClassId="+val);
    location.href=url;
}
function changePage(name)
{
  
}
function bindProduct()
{
    var val=escape($("#productClassDp :selected").attr("value"));
    var url="";        
    url=convertURL("selectRole.aspx?action_program=bind&programId="+$("#pid_hid").attr("value")+"&productClassId="+val);
    location.href=url;
}
function SelectKey(url)
{
    var url="";
      url=convertURL("selectRole.aspx?productId="+$("#pid_hid").attr("value")+"&action=bind&key="+escape($("#keyword").attr("value"))+"&ClassId="+$("#Selectid option:selected").attr("value")+"&CurrentIndex=1");  
      location.href=url;  
}
</script>
